<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
		<link rel="stylesheet" href="<%=request.getContextPath()%>/css/uniform.css" />
  </head>
	<body>
  <input type="button" class="btn btn-mini btn-info" value="返回" id="returnBack" ></input>
  <br />
  <br />
	<div style="text-align:left;">
	  <div id="content-header">
	  		<h1>${assessmodel.user_nm }</h1>
	  </div>
	  <div class="container-fluid">
	    <hr>
			<div class="row-fluid">
				<input type="hidden" name="ids" id="ids" value="${ids}" />
	       <div class="widget-box collapsible">
	         <div class="widget-title"> <a href="#collapseOne" data-toggle="collapse"> <span class="icon"><i class="icon-facebook-sign"></i></span>
	           <h5>个人信息</h5>
	           </a> </div>
	         <div class="collapse in" id="collapseOne">
	           <div class="widget-content"> 邮箱: ${assessmodel.user_email } &nbsp;&nbsp;&nbsp;&nbsp;<br/>手机号码: ${assessmodel.user_phone }
	            <br/>单位名称: ${assessmodel.company_name }
	            <br/>部门: ${assessmodel.department } &nbsp;&nbsp;&nbsp;&nbsp;<br/>职位: ${assessmodel.position }
	           </div>
	         </div>
	         <div class="widget-title"> <a href="#collapseTwo" data-toggle="collapse"> <span class="icon"><i class="icon-bookmark"></i></span>
	           <h5>问卷发放信息</h5>
	           </a> </div>
	         <div class="collapse in" id="collapseTwo">
	           <div class="widget-content"> 问卷名称：${rebackmodel.survey_name }
	           </div>
	         </div>
	         <div class="widget-title"> <a href="#collapseThree" data-toggle="collapse"> <span class="icon"><i class="icon-share-alt"></i></span>
	           <h5>问卷回收情况</h5>
	           </a> </div>
	         <div class="collapse in" id="collapseThree">
	           <div class="widget-content">
	           		<!-- 问卷回收情况列表 -->
	              <table class="table table-bordered table-invoice-full" style="font-size:12px;">
	                <thead>
	                  <tr>
	                    <th class="head0">回收状态</th>
	                    <th class="head0 right">发放数</th>
	                    <th class="head1 right">回答数[已提交]</th>
	                    <th class="head0 right">保存数[未提交]</th>
	                    <th class="head1 right">未回答数</th>
	                    <th class="head0 right">问卷回收率</th>
	                  </tr>
	                </thead>
	                <tbody>
	                  <tr>
	                    <td align="center">${rebackmodel.survey_flg_name }</td>
	                    <td align="right">${rebackmodel.send_counts }</td>
	                    <td align="right">${rebackmodel.submit_counts }</td>
	                    <td align="right">${rebackmodel.save_counts }</td>
	                    <td align="right">${rebackmodel.unanswered_counts }</td>
	                    <td align="right"><span class="label label-important"><strong>${rebackmodel.recycling_rate }</strong></span></td>
	                  </tr>
	                </tbody>
	              </table>
							</div>
	         </div>
	         
	         <div class="widget-title"> <a href="#collapseFour" data-toggle="collapse"> <span class="icon"><i class="icon-bar-chart"></i></span>
	           <h5>【问卷因子平均分】统计情况</h5>
	           </a> </div>
	         <div class="collapse in" id="collapseFour">
	           <div class="widget-content">
						    <table id="factorGrid"></table>
						    <div id="factorPager"></div>
							</div>
	         </div>
	         
	        <div class="widget-title"> <a href="#collapse5" data-toggle="collapse"> <span class="icon"><i class="icon-bar-chart"></i></span>
	           <h5>【不同评估者得分】统计情况</h5>
	           </a> </div>
	         <div class="collapse in" id="collapse5">
	           <div class="widget-content">
						    <table id="relationGrid"></table>
						    <div id="relationPager"></div>
							</div>
	         </div>
	         	<!-- 有开放性问题则显示 -->
	         <s:if test="openQuestionList != null&& openQuestionList.size>0">
		        <div class="widget-title"> <a href="#collapse6" data-toggle="collapse"> <span class="icon"><i class="icon-bullhorn"></i></span>
		           <h5>【开放性问题】</h5>
		           </a> </div>
			         <div class="collapse" id="collapse6">
			          		<div class="span12">
			          			<table class="table table-bordered table-invoice" style="font-size:12px;">
			          				<tr></tr>		          				
			          				<s:iterator value="openQuestionList" id="open" >
					          				<tr>
					          					<th style="width:20%">开放性问题</th>
					          					<th style="text-align:left;"><span class="label label-info"><s:property value="#open.keyword"/></span>
					          							<code><s:property value="#open.question_name"/></code></th>
					          				</tr>
					          				<s:iterator value="#open.openRelationList" id="o" status="option">
						          				<tr>
						          					<th><s:property value="#o.name"/></th>
						          					<td><s:property value="#o.content"/></td>
						          				</tr>
					          				</s:iterator>       				
			          				</s:iterator>
			          			</table>
			          		</div>
			         </div>
		        </s:if>

	         	<!-- 有特殊个别问题需要统计则显示 -->
	         <s:if test="speQuestionList != null && speQuestionList.size>0">
		        <div class="widget-title"> <a href="#collapse7" data-toggle="collapse"> <span class="icon"><i class="icon-hand-right"></i></span>
		           <h5>【个别特殊问题】</h5>
		           </a> </div>
		         <div class="collapse" id="collapse7">
		          		<div class="span12">
		          			<table class="table table-bordered table-invoice" style="font-size:12px;">
		          				<tr></tr>		          				
		          				<s:iterator value="speQuestionList" id="spe" >
				          				<tr>
				          					<th style="width:20%">个别问题</th>
				          					<th style="text-align:left;"><span class="label label-info"><s:property value="#spe.keyword"/></span>
				          							<code><s:property value="#spe.question_name"/></code></th>
				          				</tr>
				          				<tr>
				          					<th>自评得分</th>
				          					<td><s:property value="#spe.question_sum_zp"/>分（整体平均得分：<s:property value="#spe.question_total_zp"/>）</td>
				          				</tr>    
				          				<tr>
				          					<th>他评得分</th>
				          					<td><s:property value="#spe.question_sum_tp"/>分（整体平均得分：<s:property value="#spe.question_total_tp"/>）</td>
				          				</tr>     				
		          				</s:iterator>
		          			</table>
		          		</div>
		         </div>
	         </s:if>
	         	<!-- 360评分全貌图显示 -->
	         <s:if test="allQuestionList != null&& allQuestionList.size>0">
		        <div class="widget-title"> <a href="#collapse8" data-toggle="collapse"> <span class="icon"><i class="icon-camera"></i></span>
		           <h5>【360评分全貌图】</h5>
		           </a> </div>
		         <div class="collapse" id="collapse8">
		          		<div class="span12">
		          			<table class="table table-bordered table-invoice" style="font-size:12px;">
		          				<tr></tr>		  
		          				<tr>
		          					<td>【360评分全貌图】</td>
		          					<th>上级</th>
		          					<th>平级</th>
		          					<th>下属</th>
		          					<th>自评</th>
		          				</tr>	
		          				<s:iterator value="allQuestionList" id="all" >
		          					<tr>
			          					<th style="text-align:left;">
						          					<span class="label label-info"><s:property value="#all.keyword"/></span>
						          					<s:property value="#all.question_name"/>
							          	</th>
							          	<s:iterator value="#all.openRelationList" id="o" status="option">
							          			<td><s:property value="#o.score"/></td>
							          	</s:iterator>
						          	</tr>
		          				</s:iterator>
		          				
		          			</table>
		          		</div>
		         </div>
		         
	        </s:if>
	       </div>
			</div>
	  </div>
	</div>
		
		<script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.uniform.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery/plugin/jquery.form.min.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery/jqGridUtil.js"></script>
    <script type="text/javascript">
    jQuery(function(){

			  //返回事件
	    	jQuery("#returnBack").bind("click",function(){
	    		
	    		refMainContent('<%=request.getContextPath()%>/survey/reback/surveyRebackList.html');
	    	});
				var ids =  jQuery("#ids").val();
        // 【问卷因子平均分】统计情况
				var configFactorGrid = {
			          url:'<%=request.getContextPath() %>/survey/reback/surveyFactorAverageList.html?doType=query&ids='+ids,
		           	colModel:[
		              		{label:'factor_id',name:"factor_id",index:'factor_id', key:true ,hidden:true},
		                		{label:'问卷因子',name:"factor_name",index:'factor_name'},
		                		{label:'本人得分',name:"self_score",index:'self_score'},
		                		{label:'全员平均得分',name:"whole_self_score",index:'whole_self_score'},
		                		{label:'全员最高得分',name:"whole_high_score",index:'whole_high_score'}
		           	],
		           	table:"#factorGrid",
		            caption:"问卷因子平均分",
		            multiselect:false
		      };
	    	jQuery.loadGrid(configFactorGrid);

		    // 【不同评估者得分】统计情况
	    	var configRelationGrid = {
	               	url:'<%=request.getContextPath() %>/survey/reback/assessRebackList.html?doType=query&ids='+ids,
	               	colModel:[
	               		{label:'relation',name:"relation",index:'relation', key:true ,hidden:true},
	                 	{label:'评估者',name:"relation_name",index:'relation_name'},
	              		{label:'本人得分',name:"self_score",index:'self_score'},
		            		{label:'全员平均得分',name:"whole_self_score",index:'whole_self_score'},
		            		{label:'全员最高得分',name:"whole_high_score",index:'whole_high_score'}
	               	],
	               	table:"#relationGrid",
	                caption:"不同评估者得分",
		              multiselect:false
	          };
	          
		    	jQuery.loadGrid(configRelationGrid);
    	
    });
    </script>
    
  </body>
</html>
